/**
 * Categary.java
 * cn.feigme.cms.model
 * @author Feigme 
 * 2008-4-7
 */
package cn.feigme.cms.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * @author Feigme 
 *
 */
@Entity
@Table(name="pf_cms_categary_tbl")
public class Categary implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String id;
	private String name;
	private Integer compositor;
	private List<Article> articles;
	
	@OneToMany(mappedBy="categary",fetch=FetchType.LAZY)
	public List<Article> getArticles() {return articles;}
	public void setArticles(List<Article> articles) {this.articles = articles;}
	
	@Id   
    @GeneratedValue(generator = "system-uuid")   
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
	public String getId() {return id;}
	public void setId(String id) {this.id = id;}
	
	public String getName() {return name;}
	public void setName(String name) {this.name = name;}
	
	public Integer getCompositor() {return compositor;}
	public void setCompositor(Integer compositor) {this.compositor = compositor;}
	
	

}
